Conversation
|
This won't break older versions right? |
I cannot imagine how. Adding Sry for not creating a minimal PR in the first place, btw. Do you want me to rebase to current master? |
|
Yes please rebase |
8de15c0 to
29cc0f3
Compare
|
Hello @bertsky, is this good to move forward? You implied in your original post that this change is depending on a tesseract issue (or is it not a hard dependency?) |
|
Hi @sirfz, yes, I can see no reason not to include this in tesserocr. (Like I said, it's a soft dependency – it only acts if libtesseract throws C++ exceptions, which so far it never did.) However, it will not be much use until the PR in Tesseract gets merged. Unfortunately, the discussion there seems to be stalled. |
https://build.opensuse.org/request/show/1310399 by user mia + dimstar_suse - Drop unpin-cython.patch but make version range explicit in BuildRequires - Update to 2.9.0 * fix: update test, make it pass gh#sirfz/tesserocr#364 * Improve stub file gh#sirfz/tesserocr#371 * Convert more exceptions gh#sirfz/tesserocr#365 * Drop python2 support gh#sirfz/tesserocr#377 * All words error handling gh#sirfz/tesserocr#378
To be used in conjunction with tesseract-ocr/tesseract#4420 – which hopefully will get merged in some form, ultimately.
There may be more functions that need exception conversion.
Example result:
That is, there was a failed assertion in libtesseract, which now throws a C++ exception instead of hard
abort(), so in Cython we could convert it to Python exception, which we can then catch and act on.